@echo off 
title ADB Install Apks[By WangFangChen]
goto BEGIN

:COMMENT
echo ##############################################
rem 	adb_install_apks.bat
rem			 
rem		
rem 	Description:
rem 		Used to install all the apks in a PATH including 
rem 	the subdirs.
rem 
rem 	Version: 2.3
rem
echo ##############################################
pause


:BEGIN
echo.
echo ################   start install apk  and count ...    ################ 
goto MAIN


:MAIN
 
del *.jishu
 
set m=0
set name=install
for /R %%s in (*.apk) do (
echo zheng zai an zhuang  %%s 
 adb install -r "%%s" >> %name%.jishu
 set /a m+=1
)



set n=0
for %%a in (*.jishu) do (
for /f "usebackq delims=" %%b in ("%%a") do (
rem for %%c in (%%b) do (
if "%%b"=="Success" set /a n+=1
)
)
)

echo Success :%n%  cishu




:End
echo.
echo ################    ===============All apk num:%m%==============Success Count: %n% =========!   ################
pause

 